package com.ruoyi.base.api.factory;

import com.ruoyi.base.api.AccountService;
import com.ruoyi.base.api.InventoryService;
import com.ruoyi.base.api.domain.Account;
import com.ruoyi.base.api.domain.Inventory;
import com.ruoyi.common.core.web.domain.AjaxResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;

public class InventoryFallbackFactory implements FallbackFactory<InventoryService> {
    private static final Logger log = LoggerFactory.getLogger(InventoryFallbackFactory.class);

    @Override
    public InventoryService create(Throwable throwable) {
        log.error("基础服务调用失败:{}", throwable.getMessage());
        return new InventoryService() {
            @Override
            public AjaxResult edit(Inventory inventory) {
                return null;
            }

            @Override
            public AjaxResult getInfo(Long id) {
                return null;
            }

            @Override
            public AjaxResult add(Inventory inventory) {
                return null;
            }

            @Override
            public AjaxResult save(Inventory inventory) {
                return null;
            }
        };



    }
}
